<?php

require_once 'init.inc';

$page = new Page(FAQ_PAGE_ID);
$title = $page->title();
$keywordsOb = new KeyWords('cf_pages', 'id', $page->id());
$keywords = $keywordsOb->words();

$faq = array();

$q = createQuery("
	SELECT id,question,answer
	FROM faq
	ORDER BY sort_order
");
$q->execute();
while ($q->fetch())
{
	$faq[] = array(
		'id' => $q->at(0),
		'question' => $q->at(1),
		'answer' => $q->at(2)
	);
}
$q->close();

assignTemplateVars('page','title','keywords','faq');
display('faq');
?>